<!--# layout("/common/layout.html",{"jsBase":"/js/cms/buyHouseSubsidies/"}){ -->
<!--#if(buyHouseSubsidies.businessStateCode == '3'){ -->
<div class="layui-tab">
    <ul class="layui-tab-title">
        <li class="layui-this">审核界面</li>
        <li>审核进度</li>
    </ul>

    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
  <!--# } -->
            <form class="layui-form " id="updateForm">
                <!--# include("include.html"){} -->

                <!--#if(buyHouseSubsidies.businessStateCode == '3'){ -->
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">审核意见</label>
                    <div class="layui-input-block">
                        <textarea id="handlingSuggestion" name="handlingSuggestion" class="layui-textarea" lay-verify="required"></textarea>
                    </div>
                </div>
                <layui:acceptance id="acceptance"/>
                <!--# } -->
                <!--#else{ -->
                <layui:find id="updateButton">返回</layui:find>
                <!--# } -->
            </form>
            <!--#if(buyHouseSubsidies.businessStateCode == '3'){ -->
        </div>
        <div class="layui-tab-item">
            <table id="businessProcessTable" lay-filter="businessProcessTable"></table>
        </div>
    </div>
</div>
<!--# } -->
    <!--#} -->
    <script>
        layui.use(['edit', 'element','fushenedit'], function () {
            var industrialTalentsEdit = layui.fushenedit
            industrialTalentsEdit.init();
            var businessId = '${buyHouseSubsidies.id}';
            var businessType = '2';
            var table = layui.table;
            table.render({
                elem : '#businessProcessTable',
                height : Lib.getTableHeight(1),
                cellMinWidth: 100,
                method : 'post',
                url : Common.ctxPath + '/cms/businessProcess/list.json?businessId='+businessId + '&businessType='+ businessType// 数据接口
                ,page : Lib.tablePage // 开启分页
                ,limit : 10,
                cols : Common.ProcessCols

            });
        });

        /**
         * 必须勾选才能进行操作
         */

        function validAll(f) {
            console.log("validAll");
            var allCheckBox = $(".validCheckBox");
            var result = true;
            allCheckBox.each(function () {
                result = result & $(this).prop("checked");
            });
            if (result == true) {
                f();
            } else {
                Common.info("必须勾选所有检查确认框");
            }
            return result;
        }

        function terminal() {
            console.log("terminal");

            var callback = function () {
                parent.window.dataReload();
                Common.info("终止成功");
                Lib.closeFrame();
                parent.forChildWindow();

            };
            Common.openConfirm("确认终止", function () {
                Lib.submitForm("/cms/buyHouseSubsidies/finalcheckTerminal.json", $('#updateForm'), {}, callback);
            });
        }


        function back() {
            console.log("back");

            var callback = function () {
                parent.window.dataReload();
                Common.info("退回成功");
                Lib.closeFrame();
                parent.forChildWindow();

            };
            Common.openConfirm("确认退回", function () {
                Lib.submitForm("/cms/buyHouseSubsidies/finalcheckBack.json", $('#updateForm'), {}, callback);
            });
        }
        $("#updateButton-cancel").click(function () {
            Lib.closeFrame();
        });

        function pass() {
            console.log("pass");

            var callback = function () {
                parent.window.dataReload();
                Common.info("通过成功");
                Lib.closeFrame();
                parent.forChildWindow();

            };
            Common.openConfirm("确认退回", function () {
                Lib.submitForm("/cms/buyHouseSubsidies/finalcheckPass.json", $('#updateForm'), {}, callback);
            });
        }
    </script>